<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>绑定THML Class：对象语法</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <div class="static"
            v-bind:class="{active: isActive, 'text-danger': hasError}">
            绑定THML Class  
        </div>

        <div v-bind:class="classObject">
            绑定THML Class2
        </div>
    </div>
</body>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            isActive: true,
            hasError: false,
            classObject: {
                active: true,
                'text-danger': false
            }
        }
    })
</script>
</html>